<template>
  <div>
    <h2>道路运输车辆基础信息接口</h2>

    <h5>
      查询指定数据：<input type="text" v-model="searchCondition" placeholder="请输入查询Xxx">
      <el-button type="primary" @click="selectcondition">点击查询</el-button>
    </h5>


    <el-table :data="roadtransportvehiclesList" style="width: 100%" border empty-text="暂无数据" >

      <el-table-column prop="APPNO" label="申请号" width="180" />

      <el-table-column prop="AXLENUM" label="轴数" width="180" />

      <el-table-column prop="BUSINESSTYPE" label="业务类型" width="180" />

      <el-table-column label="操作">
        <template #default="scope">
          <el-button type="success" @click="test(scope.row)">查看详细</el-button>
        </template>
      </el-table-column>
    </el-table>

    <el-dialog v-model="dialogVisible" title="详细信息" width="30%">
      <div style="text-align: left">
        申请号：{{Roadtransportvehicles.APPNO}}
        <br/>
        轴数：{{Roadtransportvehicles.AXLENUM}}
        <br/>
        业务类型：{{Roadtransportvehicles.BUSINESSTYPE}}
        <br/>
        发动机排量：{{Roadtransportvehicles.ENGINEDISCHARGE}}
        <br/>
        发动机号：{{Roadtransportvehicles.ENGINENO}}
        <br/>
        发动机功率：{{Roadtransportvehicles.ENGINEPOWER}}
        <br/>
        出厂日期：{{Roadtransportvehicles.FACTORYDATE}}
        <br/>
        燃料类型代码：{{Roadtransportvehicles.FUELTYPECODE}}
        <br/>
        GPS厂家：{{Roadtransportvehicles.GPSFACTORY}}
        <br/>
        GPS厂家类型：{{Roadtransportvehicles.GPSFACTORYTYPE}}
        <br/>
        GPS安装日期：{{Roadtransportvehicles.GPSINSTALLDATE}}
        <br/>
        重型车：{{Roadtransportvehicles.HEAVYCAR}}
        <br/>
        是否通讯：{{Roadtransportvehicles.ISCOMMUNICATION}}
        <br/>
        是否锁定：{{Roadtransportvehicles.ISLOCK}}
        <br/>
        是否记录设备：{{Roadtransportvehicles.ISRECORDDEVICE}}
        <br/>
        是否记录设备GPS：{{Roadtransportvehicles.ISRECORDDEVICEGPS}}
        <br/>
        是否视频设备：{{Roadtransportvehicles.ISVIDEODEVICE}}
        <br/>
        空车质量：{{Roadtransportvehicles.KERBMASS}}
        <br/>
        法人身份证号：{{Roadtransportvehicles.LEGALIDNUM}}
        <br/>
        生产厂家代码：{{Roadtransportvehicles.MANUNITCODE}}
        <br/>
        名称：{{Roadtransportvehicles.NAME}}
        <br/>
        性质：{{Roadtransportvehicles.NATURE}}
        <br/>
        操作时间：{{Roadtransportvehicles.OPERATETIME}}
        <br/>
        操作单位：{{Roadtransportvehicles.OPERATEUNIT}}
        <br/>
        所有者ID：{{Roadtransportvehicles.OWNERID}}
        <br/>
        客座数：{{Roadtransportvehicles.PASSENGERSEAT}}
        <br/>
        付款方式：{{Roadtransportvehicles.PAYMENT}}
        <br/>
        付款吨位：{{Roadtransportvehicles.PAYMENTTONNAGE}}
        <br/>
        车牌颜色代码：{{Roadtransportvehicles.PLATECOLORCODE}}
        <br/>
        购买日期：{{Roadtransportvehicles.PURCHASEDATE}}
        <br/>
        实际叶片片数：{{Roadtransportvehicles.REALLEAFSPRINGPIECE}}
        <br/>
        注册日期：{{Roadtransportvehicles.REGISTERDATE}}
        <br/>
        备注：{{Roadtransportvehicles.REMARK}}
        <br/>
        结算日期：{{Roadtransportvehicles.SETTLEDDATE}}
        <br/>
        SIM卡号：{{Roadtransportvehicles.SIMCARDNO}}
        <br/>
        状态：{{Roadtransportvehicles.STATUS}}
        <br/>
        悬挂形式：{{Roadtransportvehicles.SUSPENSIONFORM}}
        <br/>
        油箱容积：{{Roadtransportvehicles.TANKVOLUME}}
        <br/>
        税务区：{{Roadtransportvehicles.TAXDISTRICT}}
        <br/>
        终端号：{{Roadtransportvehicles.TERMINALNO}}
        <br/>
        吨位：{{Roadtransportvehicles.TONNAGE}}
        <br/>
        总质量：{{Roadtransportvehicles.TOTALQUALITY}}
        <br/>
        牵引重量：{{Roadtransportvehicles.TRACTIONWEIGHT}}
        <br/>
        交通号：{{Roadtransportvehicles.TRAFNO}}
        <br/>
        车厢：{{Roadtransportvehicles.VEHIBOX}}
        <br/>
        车辆类别：{{Roadtransportvehicles.VEHICLECATEGORY}}
        <br/>
        车辆颜色：{{Roadtransportvehicles.VEHICLECOLOR}}
        <br/>
        车辆ID：{{Roadtransportvehicles.VEHICLEID}}
        <br/>
        车辆型号：{{Roadtransportvehicles.VEHICLEMODEL}}
        <br/>
        车辆号：{{Roadtransportvehicles.VEHICLENO}}
        <br/>
        车辆类型代码：{{Roadtransportvehicles.VEHICLETYPECODE}}
        <br/>
        车高：{{Roadtransportvehicles.VEHIHIGH}}
        <br/>
        车长：{{Roadtransportvehicles.VEHILENGTH}}
        <br/>
        车宽：{{Roadtransportvehicles.VEHIWIDTH}}
        <br/>
        车辆识别代码：{{Roadtransportvehicles.VIN}}
        <br/>
        车轴距：{{Roadtransportvehicles.WHEELBASE}}
        <br/>

        <el-button  @click="addOne(Roadtransport)">
          点击添加
        </el-button>

      </div>
    </el-dialog>

  </div>
</template>

<script>
import axios from "axios";
import {ElMessage} from "element-plus";

export default {
  name: "RoadtransportvehiclesView",
  data(){
    return {
      roadtransportvehiclesList:[],
      dialogVisible:false,
      Roadtransportvehicles:{},
      searchCondition:"",
    }
  },created() {
    axios("http://localhost:8000/consumerselect/roadtransportvehicles").then(
        (res)=>{
          this.roadtransportvehiclesList = res.data;
          ElMessage.info("数据查询完成")
        }
    )
  },methods:{
    test(row){
      this.Roadtransportvehicles = row;
      this.dialogVisible = true;
    },
    selectcondition(){
      axios(`http://localhost:8000/consumerselect/roadtransportvehicles?app_no=${this.searchCondition}`).then(
          (res)=>{
            this.roadtransportvehiclesList = res.data
            ElMessage.info("条件查询完成")
          }
      )
    },
    addOne(row){
      alert("添加功能还未开放")
    }
  }
}
</script>

<style scoped>

</style>